/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: XMQ
 * Date: 2022-05-10
 * Time: 18:38
 */
public class Test {
    public  int age;
    public static  String name;
    public void function(){

    }

    public static void setName(String name) {
        Test.name = name;
        Test test = new Test();
        test.function();
    }
    {
        //实例化代码块
    }
    static {
        //静态代码块
        System.out.println("这是静态代码块！");
    }
    public static void main(String[] args) {
        System.out.println(name);
        Test test = new Test();
        System.out.println(test.age);
        System.out.println(name);
        setName("123");


        test.function();
    }
}
